<template>
	<view class="content">
		<view class="list-wrapper">
			<view class="item u-f-jsb">
				<view>加注机编号</view>
				<input style="text-align: right;" placeholder="请输入加注机编号" v-model="macCode"/>
			</view>
			<view class="item">
				<view>故障描述</view>
				<textarea class="fault-descript" v-model="remark" cols="30" rows="10" placeholder="请描述故障现象"></textarea>
			</view>
		</view>
		<button class="btn_submit" @tap="submit">提 交</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				macCode: '',
				remark: ''
			}
		},
		onLoad() {

		},
		methods: {
			submit() {
				this.$http({
					url: this.$api.systemUrl + 'fillmachinefeedback/save',
					loading: 0,
					contentType: 'json',
					data: {
						macCode: this.macCode,
						remark: this.remark // 故障描述
					}
				}).then(res => {
					uni.showModal({
						content: '提交成功！',
						showCancel: false,
						success: (res) => {
							uni.navigateBack()
						}
					})
				})
			}
		}
	}
</script>

<style lang="scss">
	.list-wrapper {
		padding: 0 30rpx;
		background: #fff;
		view {
			font-size: 28rpx;
			color: #333333;
		}
		.item {
			height: 92rpx;
			background: #fff;
			line-height: 92rpx;
			
			&:not(:last-child) {
				border-bottom: 1rpx solid #eee;
			}
		}
		.fault-descript {
			display: block;
			box-sizing: border-box;
			width: 700rpx;
			height: 460rpx;
			margin: 30rpx auto;
			background: #fff;
			padding: 20rpx;
			line-height: 1.6;
		}
	}
	/* 确定按钮 */
	.btn_submit {
		position: fixed;
		bottom: 100rpx;
		border-radius: 60rpx;
	}
</style>
